
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>用户列表</title>

<link type="text/css" rel="stylesheet"
	href="js/jquery-easyui-1.5.3/themes/default/easyui.css" />
<link type="text/css" rel="stylesheet"
	href="js/jquery-easyui-1.5.3/themes/icon.css" />
<link type="text/css" rel="stylesheet" href="css/main.css">


</head>
<body>

	<div data-options="region:'center',split:true">
		<!--表格查询-->
		<div class="tableFind">
			
			<!-- 模糊查询 -->
			 <p>
				<label>用户名</label>
				<input type="text" id="userName"  onkeydown="if(event.keyCode==13) searchMessage()"/> 
				<a id="btn"
					href="javascript:searchMessage()" class="easyui-linkbutton tableFindBut"
					data-options="iconCls:'icon-search'" onclick="obj.find()">查询	
			    </a>
			</p> 			
			
		</div>
		<!--表格列表-->
		<div class="tableCon">

			<table id="user_dg" class="easyui-datagrid" style="height: 470px;"
				url="${pageContext.request.contextPath}/UserMessage/findAll.do"
				toolbar="#user_toolbar" pagination="true" rownumbers="true"
				fitColumns="true" singleSelect="true"
				data-options="fit:false,border:false,pageSize:10,pageList:[10,20,30,40]">
				<thead>

					<!-- 管理表格-表头的修改 -->
					<tr>
						<th field="cb" checkbox="true" align="center"></th>
						<th field="userNo" width="50" align="center">编号</th>
						<th field="userName" width="50" align="center">姓名</th>
						<th field="password" width="50" align="center">密码</th>
						<th field="userImg" width="50" align="center">头像</th>
						<th field="userPhone" width="50" align="center">联系电话</th>
						<th field="userEmail" width="150" align="center">电子邮箱</th>
					</tr>
				</thead>
			</table>
		</div>
	</div>

	<script type="text/javascript">
		//重新设置easy ui的时间格式
		$.fn.datebox.defaults.formatter = function(date) {
			var y = date.getFullYear();
			var m = date.getMonth() + 1;
			var d = date.getDate();
			return y + '/' + m + '/' + d;
		}
		$.fn.datebox.defaults.parser = function(date) {
			if (date) {
				return new Date(date)
			} else {
				return new Date();
			}
		}
		
		//模糊查询
		function searchMessage() {
			$('#user_dg').datagrid('load', {
				userName : $('#userName').val()
			});
		}
		
	</script>

	<script src="js/jquery-easyui-1.5.3/jquery.min.js"></script>
	<script src="js/jquery-easyui-1.5.3/jquery.easyui.min.js"></script>
	<script src="js/jquery-easyui-1.5.3/locale/easyui-lang-zh_CN.js"></script>
	<script src="js/user.js"></script>


</body>
</html>